package cn.xx.a;

import java.util.Scanner;

public class Test5 {
    //方法 声明异常
    public static void show() throws Exception{
        Scanner in = new Scanner(System.in);
        System.out.print("请输入被除数:");
        int num1 = in.nextInt();
        System.out.print("请输入除数:");
        int num2 = in.nextInt();
        System.out.println(num1+"/"+ num2 +"="+ num1/num2);
    }

    public static void main(String[] args) {
        try {
            Test5.show();
        } catch (Exception e) {
          e.printStackTrace();
            System.err.println("输入的除数不是整数，重新输入");
        }
    }
}
